<%-- 
    Document   : uploaddoc
    Created on : Mar 9, 2012, 11:03:59 AM
    Author     : kasun
--%>
<%@page import="java.util.List"%>
<%@page import="java.util.Iterator"%>
<%@page import="java.util.ArrayList"%>
<%@page import="org.w3c.dom.Document"%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="karshafinsearch.parseDocument"%>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script language="javascript">
    
    var arr = new Array();
    arr[0] = new Array("Credit Card 102.pdf","Credit Card 124.pdf","Credit Card 145.pdf","Credit Card 1135.pdf","Credit Card 1356.pdf");
    arr[1] = new Array("Arpico Finance FD.pdf","Asian Fin FD Disclosure.pdf","cifl FD Application.pdf","fd Comm bank .pdf");

    function change(class_name)
    {
        var comboValue = class_name.value;
        document.forms["form"].elements["combo2"].options.length=0;
        for (var i=0;i<arr[comboValue].length;i++)
        {
            
            
            var option = document.createElement("option");
            option.setAttribute('value',i+1);
            option.innerHTML = arr[comboValue][i];
            document.forms["form"].elements["combo2"].appendChild(option);
        }
    }
    
    
    
    function combochange(item){
        var MESSAGE = item;
        document.getElementById("msg").innerHTML = MESSAGE;
    }
    
</script>



<div id="indexRightColumn">

    <h2>Select Document</h2> 
    <form name="form" method="post" action="topkphrases">
        
        <table border="0" cellspacing="2">
            
            <tbody>
                <tr>
                    <td>Select  Type of Document Collection</td>
                    <td>
                        <select name="class_name" onchange="change(this);">
                            <%
                            List doccollection = new ArrayList();
                                doccollection.add("Credit Card");
                                doccollection.add("Fixed term Deposit");
                                for (int i =0; i <doccollection.size(); i++) {
                            %>
                            <option value="<%=i%>"><%=doccollection.get(i)%></option>
                            <%
                                }
                            %> 
                        </select>
                    </td>
                </tr>
                <tr>
                    <td>select document</td>
                    <td>
                        <select name="combo2"></select>
                    </td>
                </tr>
                
                <tr></tr>
                <tr></tr>
                
                <tr>
                    <td><input type="submit" value="Extract Phrases" name="ExtractPhrases" /> </td>
                    <td></td>
                </tr>
               
            </tbody>
        </table>

    </form>
    
        <br/><br/>    <div class="buttonPos">
                
                Select Document
                <a href="Rank Phrases">
                    <input type="submit" value="Next" name="next" />
                </a>
            </div>
</div>

